extends layout

block content

  h1= title
  
  p #[strong Do you really want to delete this BookInstance?]
  
  div(style="margin-left:20px")

    p #[strong ID]: #{bookinstance._id}
  
    p #[strong Title:] 
      a(href=bookinstance.book.url) #{bookinstance.book.title}
    
    p #[strong Imprint:] #{bookinstance.imprint}

    p #[strong Status:] 
      if bookinstance.status=='Available'
        span.text-success #{bookinstance.status}
      else if bookinstance.status=='Maintenance'
        span.text-danger #{bookinstance.status}
      else
        span.text-warning #{bookinstance.status} 
      
    if bookinstance.status!='Available'
      p #[strong Due back:] #{bookinstance.due_back_formatted}

  form(method='POST' action='')
    div.form-group
      input#id.form-control(type='hidden',name='id', required='true', value=bookinstance._id )

    button.btn.btn-primary(type='submit') Delete